home *** CD-ROM | disk | FTP | other *** search
- property pSoundList,pCurrentVox
-
- on new me
- set pCurrentVox = ""
- set pSoundList = []
- return me
- end new
-
- on mDoVoxThing me,voxToPlay
-
- -- Note: mStopVox resets pCurrentVox
- if (voxToPlay = pCurrentVox) then
- mStopVox(me)
- return (-1)
- else if (soundBusy(3)) then
- mStopVox (me)
- end if
-
- set pCurrentVox = voxToPlay
- mLowerSounds (me)
- set aFileName = the fileName of cast voxToPlay
- if (aFileName = "") then
- puppetSound 3,voxToPlay
- updateStage
- else
- sound playFile 3, aFileName
- end if
- return (0)
- end mDoVoxThing
-
- on mStopVox me
- mRaiseSounds (me)
- end mStopVox
-
- on mMyStepFrame me
- global gMyActorList
- if ((pCurrentVox <> "") and not(soundBusy(3))) then
- mStopVox (me)
- set gMyActorList = []
- end if
- end mMyStepFrame
-
- on mLowerSounds me
- set pSoundList = []
- repeat with i = 1 to 48
- if (the type of the member of sprite i = #digitalVideo) then
- add(pSoundList,i)
- set the volume of sprite i = 50
- end if
- end repeat
- end mLowerSounds
-
- on mRaiseSounds me
- sound stop 3
- set pCurrentVox = ""
- if (not(listP(pSoundList))) then
- exit
- end if
- if (count(pSoundList) = 0) then
- exit
- end if
- repeat with i in pSoundList
- -- Add in a check, just in case a sprite or something happened
- -- to change in between calls...
- if (the type of the member of sprite i = #digitalVideo) then
- set the volume of sprite i = 255
- else
- -- if debugging, this should never happen.
- end if
- end repeat
- --updateStage
- end mRaiseSounds
-